package org.example.lotterysystem.service.enums;

import lombok.AllArgsConstructor;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * Author:  LiuTao
 * Version: 1.0
 * Date:    2025-04-01  22:29
 */
@AllArgsConstructor
public enum UserIdentityEnum {
    ADMIN("管理员"),
    NORMAL("普通用户");

    private final String desc;

    //身份信息校验
    public static UserIdentityEnum forName(String name) {
        for(UserIdentityEnum userIdentityEnum : UserIdentityEnum.values()) {
            if(userIdentityEnum.name().equalsIgnoreCase(name)) {
                return userIdentityEnum;
            }
        }
        return null;
    }
}
